package entity

import (
	"github.com/google/uuid"
	"gorm.io/gorm"
)

type KeyPair struct {
	ID    string `gorm:"column:id"`
	Key   string `gorm:"column:key"`
	Value string `gorm:"column:value"`
}

func (k *KeyPair) TableName() string {
	return "key_pairs"
}

func (k *KeyPair) BeforeCreate(tx *gorm.DB) (err error) {
	k.ID = uuid.NewString()
	return nil
}
